/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.wpi.first.wpilibj.templates.tshirtcannon;

/**
 * Base class that both FiringState1 and FiringState2 extend.
 * @see FiringState1
 * @see FiringState2
 * @see TShirtCannon
 * @see TShirtCannonState
 */
abstract class FiringState extends TShirtCannonState {
    /**
     * enter is called when the t-shirt cannon enters this state.
     * @param tsc The t-shirt cannon.
     */
    void enter(TShirtCannon tsc) {
        tsc.setCompressorState(true);
        tsc.setFillValveState(false);
        tsc.setDumpValveState(false);
        tsc.setLightState(true);

        tsc.startTimer();
    }

    /**
     * update is called when something calls the t-shirt cannon's update
     * function and this is the current state.
     * @param tsc The t-shirt cannon.
     */
    void update(TShirtCannon tsc) {
        super.update(tsc);
    }

    /**
     * exit is called when the t-shirt cannon enters this state.
     * @param tsc The t-shirt cannon.
     */
    void exit(TShirtCannon tsc) {
        tsc.stopTimer();
    }
}
